﻿<?php
    include_once("../db_config.php");
    session_start();
    //检测是否登录，若没登录则转向登录界面
    if(!isset($_SESSION['userid'])){
        header("Location:../");
        exit();
    }
?>
<!DOCTYPE html>
<html lang="<?php echo $lang;?>">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="">
        <meta name="author" content="ysfl" >
        <link rel="icon" href="../img/favicon.ico">
        <title><?php echo $name; echo $title;?>
        </title>
        <link href="../css/bootstrap.min.css" rel="stylesheet">
        <script src="../js/jquery.min.js"></script>
        <script src="../js/jquery.function.js"></script>
    </head>
<body>

<div class="list-group">
<span href="#" class="list-group-item active"><span style="color:rgb(6, 245, 0);"><?php echo ''.$_SESSION["level"].'</span>:<span style="color:rgb(0, 255, 245)">'.$_SESSION["username"].''; ?></span> <a href="../" class="btn btn-success btn-xs">回到主页</a> <a href="../user.php" class="btn btn-danger btn-xs">个人中心</a></span>
  <?php if($_SESSION["level"] == "游刃有余"){ echo '
  <a href="#personnel" class="list-group-item" role="button" data-toggle="collapse" href="#personnel" aria-expanded="false" aria-controls="personnel">员工管理</a>
  ';} ?>
  <a href="#bill" class="list-group-item" role="button" data-toggle="collapse" href="#bill" aria-expanded="false" aria-controls="bill">白露流水账</a>
  <a href="#lease" class="list-group-item" role="button" data-toggle="collapse" href="#lease" aria-expanded="false" aria-controls="lease">租借管理</a>
  <a href="#query" class="list-group-item" role="button" data-toggle="collapse" href="#query" aria-expanded="false" aria-controls="query">日程表</a>
  <a href="#kh" class="list-group-item" role="button" data-toggle="collapse" href="#kh" aria-expanded="false" aria-controls="kh">客户信息</a>
  <a href="#gys" class="list-group-item" role="button" data-toggle="collapse" href="#gys" aria-expanded="false" aria-controls="gys">供应商</a>
</div>

<?php if($_SESSION["level"] == "游刃有余"){ echo '
<div class="collapse" id="personnel">
  <div class="well">';
   include_once("./personnel/index.php"); echo '
  </div>
</div>
';} ?>

<div class="collapse" id="bill">
  <div class="well">
   <?php include_once("./bill/index.php"); ?>
  </div>
</div>

<div class="collapse" id="lease">
  <div class="well">
   <?php include_once("./lease/index.php"); ?>
  </div>
</div>

<div class="collapse" id="query">
  <div class="well">
   <div class="tab-pane" id="query">
        <?php include_once("./query/index.php"); ?>
    </div>
  </div>
</div>

<div class="collapse" id="kh">
  <div class="well">
   <div class="tab-pane" id="kh">
        <?php include_once("./kh/index.php"); ?>
    </div>
  </div>
</div>

<div class="collapse" id="gys">
  <div class="well">
   <div class="tab-pane" id="gys">
        <?php include_once("./gys/index.php"); ?>
    </div>
  </div>
</div>
</body>
</html>
<script src="../js/bootstrap.min.js"></script>